<?php
class payQuery extends EngineSupervisor{
    
    public $db;

    public function __construct(){
            $this->db = new dataBase();
    }

    public function add($request){
        try{
            $insertValues = array(
                "user_id" => isset($_SESSION[PREFIX]['user']['id'])? $_SESSION[PREFIX]['user']['id']: 0,
                "transaction_id" => $request["t_id"],
                "transaction_status" => $request["t_status"],
                "description" => $request["description"],
                "sent_status" => $request["status"],
                "email" => $request["email"],
                "amount" => $request["amount"],
                "transaction_date" => $request["t_date"],
                "orginal_amount" => $request["orginal_amount"],
            );
            $this->db->insert('user_pay', $insertValues);
        }catch(Exception $e){
            throw $e;
        }
        return true;
    }
}